package com.jwork.progress.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

@Getter
@AllArgsConstructor
public enum RespCodeEnums {
    SUCCESS(200, "Success"),
    FAIL(400, "Operation failed."),

    FILE_OVER_SIZE(1000, "File over size."),
    FILE_FORMAT_WRONG(1001, "File format is wrong."),
    PARAM_ERROR(1003, "Request param is wrong."),
    JSON_PARSE_ERROR(1004, "Json parse error."),
    UNAUTHENTICATION_ERROR(1100, "Not authenticate."),
    UNAUTHORIZED_ERROR(1101, "Not Authorized."),
    REQUEST_METHOD_ERROR(1201, "Request method wrong."),
    API_NOT_EXIST(1301, "Api not exist."),
    TIMESTAMP_ERROR(1401, "Timestamp wrong."),
    DATA_NOT_EXIST(1501, "Data not exist."),

    REDIS_CONN_ERROR(2001, "Redis Conn wrong."),
    REDIS_OPER_ERROR(2002, "Redis operate wrong."),
    MYSQL_CONN_ERROR(2101, "MySQL Conn wrong."),
    MYSQL_QUERY_TIMEOUT(2102, "MySQL Query timeout."),
    MYSQL_DATA_NOT_EXIST(2103, "MySQl Cannot find data."),
    ELASTICSEARCH_CONN_ERROR(2201, "Redis Conn wrong."),
    ELASTICSEARCH_QUERY_TIMEOUT(2202, "Elasticsearch query timeout.");

    private int code;

    private String msg;
}
